package org.example.pojo.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class SaleLog {
    private Integer id;
    private Long userid;
    private Long goodid;
    private String username;
    private String goodname;
    private int state;
    private int num;
    private double price;
    private LocalDateTime saletime;
    private int addressid;
    private String address;
    private String consignee;
    public void copyorder(Order order) {
        userid = order.getUserid();
        goodid = order.getGoodid();
        username = order.getUsername();
        goodname = order.getGoodname();
        state = order.getState();
        num = order.getNum();
        price = order.getPrice();
        saletime = order.getSaletime();
        addressid = order.getAddressid();
        address = order.getAddress();
        consignee = order.getConsignee();
    }
}